1. Technical Field
The present invention relates to an image data processing method, a program for the image data processing method, a recording medium with the program for the image data processing method recorded, and an image data processing device, and is capable of being applied to a coding device and a decoding device for moving image data in compliance with, for example, an MPEG-4AVC/ITU-T H. 264 system. In the present invention, address data is issued to specify areas that are a plurality of read units in a horizontal direction and a vertical direction, respectively, and reference image data is stored in a cache memory, thereby making it possible to reduce access frequencies of a memory bus while reducing a capacity of the cache memory.
2. Background Art
Up to now, in a coding process in compliance with for example, H. 264/MPEG-4AVC, moving image data that has been coded is decoded and held in a frame memory, and moving image data in a subsequent frame is coded with reference to the moving image data held in the frame memory. Also, in response to this, in a decoding process, the decoded moving image data is held in the frame memory, and the moving image data in the subsequent frame or the like is decoded with reference to this moving image data.
That is, FIG. 1 is a block diagram showing a coding device of the MPEG-4AVC/ITU-T H. 264 system. A coding device 1 conducts a coding process on input image data D1 to generate an output stream D2.
Here, the coding device 1 sequentially inputs the input image data D1 to a subtraction section 2 in the order according to a GOP structure. The subtraction section 2 subtracts a predicted value that is output from a selection section 3 from the input image data D1 to output a predicted error value. A discrete cosine transform section 4 conducts a discrete cosine transform process on the predicted error value to output coefficient data. A quantization section 5 quantizes and outputs the coefficient data. An entropy coding section 6 conducts a variable length coding process on the output data of the quantization section 5, and outputs the output data. The coding device 1 adds various control codes, a motion vector MV, or the like to the output data of the entropy coding section 6 to generate the output stream D2.
An inverse quantization section 7 conducts an inverse quantization process on the output data of the quantization section 5 to decode the output data of the discrete cosine transform section 4. An inverse discrete cosine transform section 8 conducts an inverse discrete cosine transform process on the output data of the inverse quantization section 7 to decode the output data of the subtraction section 2. An addition section 9 adds the predicted value that is output from the selection section 3 to the output data of the inverse discrete transform section 8 to decode the input image data D1. A deblocking filter 10 removes block distortion from the input image data D1 that has been decoded by the addition section 9 to output the data.
A reference image memory 11 holds image data D3 that is output from the deblocking filter 10 as reference image data to output the data to a motion compensation section 12. A motion vector detection section 13 detects the motion vector MV from the input image data D1 to output the motion vector in an inter-frame coding process. The motion compensation section 12 motion-corrects the reference image data with the motion vector MV to output the data in the inter-frame coding process. A weighting prediction section 14 weights and adds the image data that is output from the motion compensation section 12 to generate a predicted value in the inter-frame coding process.
An in-screen prediction section 15 generates a predicted value in the in-frame coding process according to the output data of the addition section 9 to output the predicted value. The selection section 3 selects a predicted value that is output from the weighting prediction section 14 or a predicted value that is output from the in-screen prediction section 15 to output the selected predicted value to the subtraction section 2. A coding control section 17 controls the operation of the respective sections so as to set a code quantity of the output stream D2 to a given target value.
In the above coding process and the decoding process, when a configuration of a cache memory is applied to the reference image memory 11, it is conceivable that the image data can be coded or decoded at a further high speed.
As for the above cache memory, JP-A No. 2006-31480 discloses a configuration where in a sub-processor that decodes a compressed image, when data is transferred from a main memory to the cache memory, a memory area that executes caching on the basis of a parameter expressing the feature of an image is adaptively changed, thereby increasing a probability of hitting caching in a subsequent process.
Also, JP-A No. H11-215509 discloses a configuration in which data in an area adjacent to a right side of a reference area indicated by a motion vector of a present macroblock is preloaded in the cache memory, thereby increasing a cache hit rate.
However, the above techniques suffer from a problem that when a capacity of the cache memory is reduced, the cache hit rate is reduced, and access frequencies of a memory bus are increased although the cache hit rate is improved.